<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>
<div class="col-lg-12">
	<div class="row">
		<div class="col-lg-4"><p class="m-y-xs text-muted fl"><i class="icon-cog m-r-sm"></i>会员签到 <span class="m-l-xs label label-success">v1.0</span></p></div>
	</div>
    <div class="card">
	<div class="card-block">
	<form action="<?php echo url("plugin-setting-lc_sign");?>" method="post" id="form">
		<div class="form-group row">
			<div class="col-sm-2">
				<?php echo lang('sign_onetime'); ?>
			</div>
			<div class="col-sm-10">
				<?php echo $input['sign_onetime']; ?>
			</div>
		</div>
		<div class="form-group row">
			<div class="col-sm-2">
				<?php echo lang('sign_alltime_3'); ?>
			</div>
			<div class="col-sm-10">
				<?php echo $input['sign_alltime_3']; ?>
			</div>
		</div>
		<div class="form-group row">
			<div class="col-sm-2">
				<?php echo lang('sign_alltime_7'); ?>
			</div>
			<div class="col-sm-10">
				<?php echo $input['sign_alltime_7']; ?>
			</div>
		</div>
		<div class="form-group row">
			<div class="col-sm-2">
				<?php echo lang('sign_alltime_15'); ?>
			</div>
			<div class="col-sm-10">
				<?php echo $input['sign_alltime_15']; ?>
			</div>
		</div>
		<div class="form-group row">
			<div class="col-sm-2">
				<?php echo lang('sign_alltime_30'); ?>
			</div>
			<div class="col-sm-10">
			<?php echo $input['sign_alltime_30']; ?>
			</div>
		</div>
		
		<div class="form-group row">
			<label class="col-sm-2 form-control-label"></label>
			<div class="col-sm-2 m-b-sm" style="margin-left:120px;">
				<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
			</div>
			<div class="col-sm-2 m-b-sm" style="margin-left:120px;">
				<a role="button" class="btn btn-secondary btn-block" href="javascript:history.back();"><?php echo lang('back');?></a>
			</div>
		</div>
	</form>
    </div>
    </div>
</div>

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>

<script>
var jform = $("#form");
var jsubmit = $("#submit");
var referer = '<?php echo url("plugin-setting-lc_sign");?>';
jform.on('submit', function(){
	jform.reset();
	jsubmit.button('loading');
	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(1000).button('reset').location(referer);
		} else {
			$.alert('提交失败');
			jsubmit.button('reset');
		}
	});
	return false;
});
</script>